class PSAnimNodeBlendByEquippedWeapon extends UDKAnimBlendBase;

event TickAnim(float DeltaSeconds)
{
	local PSPawn P;

	if (SkelComponent.Owner != none)
		P = PSPawn(SkelComponent.Owner);
	else
		P = none;

	if (P != none)
	{
		switch(P.CurrentWeapon)
		{
		case(P.EWeapon.WEAPON_unarmed):
			if(ActiveChildIndex != 0)
			{
				SetActiveChild(0, 0.2);
			}
			break;
		case(P.EWeapon.WEAPON_rifle):
			if(ActiveChildIndex != 1)
			{
				SetActiveChild(1, 0.2);
			}
			break;
		case(P.EWeapon.WEAPON_pistol):
			if(ActiveChildIndex != 2)
			{
				SetActiveChild(2, 0.2);
			}
			break;
		case(P.EWeapon.WEAPON_shotgun):
			if(ActiveChildIndex != 3)
			{
				SetActiveChild(3, 0.2);
			}
			break;	
		}
	}
}


DefaultProperties
{
	Children(0)=(Name="Unarmed")
	Children(1)=(Name="Rifle")
	Children(2)=(Name="Pistol")
	Children(3)=(Name="Shotgun")

	bTickAnimInScript=true
}